#pragma once
#include "Reflectable.h"
#include "Activator.h"
#include "noria/Marshal.h"

namespace noria {

	class IString : public IReflectable
	{
	public:
		virtual IString* Concat(const char* value) = 0;
		virtual int IndexOf(const char* value) const = 0;
		virtual int IndexOf(char value) const = 0;
	};
	DECLARE_DISPOSABLE(IString);

	template<typename T = void*>
	class StringT final
	{
	public:
		static inline IString* Create(const char* text)
		{
			return static_cast<IString*>(AcMarshal.Box(text));
		}
		static IString* Format(const char* format, const IReflectable** args)
		{
			return nullptr;
		}
	private:
		//static const IMarshal& GetMarshal()
		//{
		//	static auto& marshal = AcGetMarshal();
		//	return marshal;
		//}
	};
	typedef StringT<> String;

#define S(s) IStringPtr(String::Create(s))
}